﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
  
  <head>
    
    <%@ include file="/WEB-INF/include/meta.jsp"%>
    <%@ include file="/WEB-INF/include/css.jsp"%>
    
  </head>
  <!-- end header -->
  <body>
    <div class="page-group">
      <div class="page page-current">
        
        <header class="bar bar-nav fs-header-small fs-header-yellow">
          <a href="${ctx.host}/students?type=${param.type}" class="icon icon-left pull-left"></a>
          <h1 class="title">学员详情</h1>
        </header>
        
        <div class="content">
        
          <div class="list-block media-list no-margin" style="margin-bottom: 2rem;">
            <ul>
              <li class="course">
                <div class=" item-content">
                  <div class="item-media"><img src="${student.avatar}" style='width: 4rem;'></div>
                  <div class="item-inner">
                    <div class="item-title-row">
                      <div class="item-title">${student.name}</div>
                    </div>
                    <div class="item-subtitle">${student.mobile}</div>
                  </div>
                </div>
              </li>
            </ul>
          </div>
          
          <c:choose>
            <c:when test="${not empty courseRounds}">
              <c:forEach var="courseRound" items="${courseRounds}">
                <div class="card" style="margin: 0 0 .75rem 0;">
                  <div class="card-content">
                    <div class="list-block media-list">
                      <ul>
                        <li class="item-content">
                          <div class="item-media">
                            <img src="${ctx.cdn}/${courseRound.course.cover}" width="80">
                          </div>
                          <div class="item-inner">
                            <div class="item-title-row" style="margin: .2rem 0;">
                              <div class="item-title">${courseRound.course.name}</div>
                            </div>
                            <div class="item-subtitle" style="margin: .2rem 0; color: #777;">${courseRound.attrs['course_amount'].value == null ? courseRound.course.hours : courseRound.attrs['course_amount'].value}节课, 已上${courseRound.finished}节课</div>
                            <div class="item-text" style="height: 1.6rem;"><span class="label label-info">${courseRound.site.name}</span></div>
                          </div>
                        </li>
                      </ul>
                    </div>
                  </div>
                  <div class="card-footer">
                    <span></span>
                    <span class="color-success"><a href="${ctx.host}/students/${student.id}/rounds/${courseRound.id}" style="color: #999; text-decoration: none;">课程详情</a></span>
                  </div>
                </div>
              </c:forEach>
            </c:when>
            <c:otherwise>
              <p class="content-block bg-white" style="height: 3rem; line-height: 3rem; text-align: center;">暂无课程</p>
            </c:otherwise>
          </c:choose>
          
        </div>
        <!-- End Content -->
        
      </div>
    </div>
    
    <%@ include file="/WEB-INF/include/script.jsp"%>
    
  </body>
</html>